package com.chinatsp.onlineapp.ui.violation;

import tsp.cn.http.tools.T;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.chinatsp.onlineapp.R;
import com.chinatsp.onlineapp.base.BaseActivity;
import com.chinatsp.onlineapp.presenter.QueryViolationLogDao;
/**
 * 违章列表详情
 */
public class QueryViolationLogActivity extends BaseActivity implements View.OnClickListener{

    private ImageView ivBack;
    private ImageView ivRightRefresh;
    private QueryViolationLogDao queryViolationLogDao;

    @Override
	public void onRequestSuccess(int requestCode) {
		super.onRequestSuccess(requestCode);
		// 开始更新UI
		showProgress(false);
	}

	@Override
	public void onRequestFailed(String errorNo, String errorMessage) {
		super.onRequestFailed(errorNo, errorMessage);
		// 开始更新UI
		showProgress(false);
	}
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_query_violation_log);
        initView();
    }

    private void initView() {
        ivBack = (ImageView) findViewById(R.id.iv_back);
        ivRightRefresh = (ImageView) findViewById(R.id.iv_log_right_refresh);
        queryViolationLogDao = new QueryViolationLogDao(this, this);
        
        showProgress(true);
        queryViolationLogDao.getQueryViolationLog();
        ivBack.setOnClickListener(this);
        ivRightRefresh.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_back:
                finish();
                break;
            case R.id.iv_log_right_refresh:
                T.showShort(this,"刷新");
                break;
        }
    }
}
